home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / hardware / scantrax / install.bat next >
DOS Batch File  |  1999-04-19  |  13KB  |  526 lines

  1. ; ScanTrax Install-Script $VER: ScanTrax installer-script V1.7
  2.  
  3. (complete 0)
  4. (set #st-version "2.2")
  5. (set #st-date "Mar 30 1999")
  6. (set #os-version (/ (getversion) 65536))
  7.  
  8. (set #novice 0)
  9. (set #average 1)
  10. (set #expert 2)
  11.  
  12. (user #average)
  13. (set #germ (= @language "deutsch"))
  14. (set #engl (= #germ 0))
  15.  
  16.  
  17. (if #germ (set #loctxt "\n\nOS-30 oder höher nicht gefunden!\n\n\nInstallation wird abgebrochen!"))
  18. (if #engl    (set #loctxt "\n\nOS-30 or higher not found!\n\nInstallation will be abort!"))
  19. (if (< #os-version 39) (abort #loctxt) )
  20.  
  21. (if #germ (set #loctxt "\n\nCPU 68020 oder höher nicht gefunden!\n\n\nInstallation wird abgebrochen!"))
  22. (if #engl    (set #loctxt "\n\nCPU 68020 or higher not found!\n\nInstallation will be abort!"))
  23. (if (patmatch "68000" (database "cpu")) (abort #loctxt) )
  24. (if (patmatch "68010" (database "cpu")) (abort #loctxt) )
  25. (set #fpu (NOT (patmatch "NOFPU" (database "FPU"))) )
  26.  
  27. (if #germ (set #loctxt (cat   "\nWillkommen bei der Installation von \n\n\"ScanTrax V"
  28.                      #st-version " ("#st-date ")\"!\n\n"
  29.                     "ScanTrax ist ShareWare.\n\n"
  30.                     "Programm Urheberrecht ©1997-1999 Klaus Krause")))
  31. (if #engl (set #loctxt (cat   "\nWelcome to the installation of \n\n\"ScanTrax V"
  32.                      #st-version " ("#st-date ")\"!\n\n"
  33.                     "ScanTrax is ShareWare.\n\n"
  34.                     "Program Copyright ©1997-1999 Klaus Krause")))
  35. (message #loctxt)
  36.  
  37. (welcome)
  38. (set #userlevel @user-level)
  39.  
  40.  
  41. ;--------------------------------------------------------------------------------------
  42. ;set install dir
  43. (user 1)
  44. (set root
  45.     (askdir
  46.         (if #germ (prompt "Bitte das Verzeichnis wählen, in dem das \"ScanTrax-Verzeichnis\" erstellt werden soll."))
  47.         (if #engl (prompt "Please choose the directory, where to be create the \"ScanTrax-directory\"."))
  48.         (help @askdir-help)
  49.         (default "")
  50.         (disk)
  51.     )
  52. )
  53.  
  54. (set #path (tackon root "ScanTrax"))
  55. (makedir #path
  56.     (infos)
  57. )
  58. (set @default-dest #path)
  59. (user #userlevel)
  60.  
  61. ;info install warn
  62. (if (exists (tackon @default-dest "ScanTrax.info"))
  63.     (
  64.         (if #germ (set #loctxt (cat   "\nEine zuvor installierte Version wird nun überschrieben!\n\n"\
  65.                                     "Möchten Sie mit der Installation fortfahren?\n")))
  66.  
  67.         (if #engl (set #loctxt (cat   "\nA previous installed version is going to overwrite now!\n\n"\
  68.                                     "Would you go on with the installation?\n")))
  69.         (message #loctxt)
  70.     )
  71. )
  72.  
  73.  
  74. ;--------------------------------------------------------------------------------------
  75. ;find out <part a>
  76.  
  77. (set #demo (exists "archiv/demo.lha" (noreq)))
  78.  
  79. (if #germ (set #loctxt "Bitte wählen Sie das Scanner-Modul\n für Ihren Scanner aus!\n\nModul für:"))
  80. (if #engl (set #loctxt "Please choose the scanner-module\n for your scanner!\n\nModule for:"))
  81. (set #scanner
  82.     (askchoice
  83.         (prompt #loctxt)
  84.         (help @askchoice-help)
  85.         (if #demo
  86.             (
  87.                 (if #germ (choices "Demo Modul" "Hewlett Packard" "Epson"))
  88.                 (if #engl (choices "Demo module" "Hewlett Packard" "Epson"))
  89.             )
  90.             (
  91.                 (if #germ (choices "Hewlett Packard" "Epson"))
  92.                 (if #engl (choices "Hewlett Packard" "Epson"))
  93.             )
  94.         )
  95.         (default 0)
  96.     )
  97. )
  98.  
  99. (if (NOT #demo) (set #scanner (+ #scanner 1)))
  100.  
  101. (if #germ (set #loctxt "Bitte wählen Sie das Unterstützungsmodul für Grafikberechnungen aus!\n\nUnterstützung für:"))
  102. (if #engl (set #loctxt "Please choose the Support-module for graphic-computation!\n\nSupport for:"))
  103. (set #support
  104.     (askchoice
  105.         (prompt #loctxt)
  106.         (help @askchoice-help)
  107.         (if #fpu
  108.             (
  109.                 (if #germ (choices "MC68020 CPU" "MC68020 CPU mit FPU" "PPC mit PowerUP" "PPC mit WarpUP"))
  110.                 (if #engl (choices "MC68020 CPU" "MC68020 CPU with FPU" "PPC with PowerUP" "PPC with WarpUP"))
  111.             )
  112.             (
  113.                 (if #germ (choices "MC68020 CPU" "PPC mit PowerUP" "PPC mit WarpUP"))
  114.                 (if #engl (choices "MC68020 CPU" "PPC with PowerUP" "PPC with WarpUP"))
  115.             )
  116.         )
  117.         (default 0)
  118.     )
  119. )
  120.  
  121. (if (NOT #fpu)
  122.     (if (>= #support 1)
  123.         (
  124.             (set #support (+ #support 1))
  125.         )
  126.     )
  127. )
  128.  
  129. (if #germ (set #loctxt "Bitte wählen Sie die Mauszeiger\n für den Vorschau-Rahmen aus:\n\n"))
  130. (if #engl (set #loctxt "Please choose the Mouse-pointer\n for the Preview-frame:\n\n"))
  131. (set #pointer
  132.     (askchoice
  133.         (prompt #loctxt)
  134.         (help @askchoice-help)
  135.         (if #germ (choices "HiRes Zeiger (für A1200,A4000)" "LoRes Zeiger" "Keine Zeiger"))
  136.         (if #engl (choices "HiRes Pointer (for A1200,A4000)" "LoRes Pointer" "No Pointer"))
  137.         (default 0)
  138.     )
  139. )
  140.  
  141. ;--------------------------------------------------------------------------------------
  142. ;install archiv contents
  143.  
  144. (working
  145.     (if #germ ("Entpacke Programmdateien..."))
  146.     (if #engl ("Decompressing programmfiles..."))
  147. )
  148.  
  149. (complete 10)
  150. (if (= #scanner 0)
  151.     (
  152.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/Demo.lha" ))
  153.         (set #error (run #part))
  154.  
  155.         (if (NOT (= #error 0))
  156.             (message
  157.                 (if #germ ("Entpacken von 'Demo.lha' ist fehlgeschlagen!"))
  158.                 (if #engl ("Decompressing of 'Demo.lha' has failed!"))
  159.             )
  160.         )
  161.     )
  162. )
  163. (if (= #scanner 1)
  164.     (
  165.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/ScanJet.lha" ))
  166.         (set #error (run #part))
  167.  
  168.         (if (NOT (= #error 0))
  169.             (message
  170.                 (if #germ ("Entpacken von 'ScanJet.lha' ist fehlgeschlagen!"))
  171.                 (if #engl ("Decompressing of 'ScanJet.lha' has failed!"))
  172.             )
  173.         )
  174.     )
  175. )
  176. (if (= #scanner 2)
  177.     (
  178.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/Epson.lha" ))
  179.         (set #error (run #part))
  180.  
  181.         (if (NOT (= #error 0))
  182.             (message
  183.                 (if #germ ("Entpacken von 'Epson.lha' ist fehlgeschlagen!"))
  184.                 (if #engl ("Decompressing of 'Epson.lha' has failed!"))
  185.             )
  186.         )
  187.     )
  188. )
  189.  
  190. (complete 20)
  191. (if (= #support 0)
  192.     (
  193.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/Support_68K.lha" ))
  194.         (set #error (run #part))
  195.  
  196.         (if (NOT (= #error 0))
  197.             (message
  198.                 (if #germ ("Entpacken von 'Support_68K.lha' ist fehlgeschlagen!"))
  199.                 (if #engl ("Decompressing of 'Support_68K.lha' has failed!"))
  200.             )
  201.         )
  202.     )
  203. )
  204. (if (= #support 1)
  205.     (
  206.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/Support_68KFPU.lha" ))
  207.         (set #error (run #part))
  208.  
  209.         (if (NOT (= #error 0))
  210.             (message
  211.                 (if #germ ("Entpacken von 'Support_68KFPU.lha' ist fehlgeschlagen!"))
  212.                 (if #engl ("Decompressing of 'Support_68KFPU.lha' has failed!"))
  213.             )
  214.         )
  215.     )
  216. )
  217. (if (= #support 2)
  218.     (
  219.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/Support_PowerUP.lha" ))
  220.         (set #error (run #part))
  221.  
  222.         (if (NOT (= #error 0))
  223.             (message
  224.                 (if #germ ("Entpacken von 'Support_PowerUP.lha' ist fehlgeschlagen!"))
  225.                 (if #engl ("Decompressing of 'Support_PowerUP.lha' has failed!"))
  226.             )
  227.         )
  228.     )
  229. )
  230. (if (= #support 3)
  231.     (
  232.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/Support_WarpUP.lha" ))
  233.         (set #error (run #part))
  234.  
  235.         (if (NOT (= #error 0))
  236.             (message
  237.                 (if #germ ("Entpacken von 'Support_WarpUP.lha' ist fehlgeschlagen!"))
  238.                 (if #engl ("Decompressing of 'Support_WarpUP.lha' has failed!"))
  239.             )
  240.         )
  241.     )
  242. )
  243.  
  244. (complete 30)
  245. (if 1
  246.     (
  247.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/ScanTrax.lha" ))
  248.         (set #error (run #part))
  249.  
  250.         (if (NOT (= #error 0))
  251.             (message
  252.                 (if #germ ("Entpacken von 'ScanTrax.lha' ist fehlgeschlagen!"))
  253.                 (if #engl ("Decompressing of 'ScanTrax.lha' has failed!"))
  254.             )
  255.         )
  256.     )
  257. )
  258.  
  259. (complete 40)
  260. (if (= #pointer 0)
  261.     (
  262.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/PointerHires.lha" ))
  263.         (set #error (run #part))
  264.  
  265.         (if (NOT (= #error 0))
  266.             (message
  267.                 (if #germ ("Entpacken von 'PointerHires.lha' ist fehlgeschlagen!"))
  268.                 (if #engl ("Decompressing of 'PointerHires.lha' has failed!"))
  269.             )
  270.         )
  271.     )
  272. )
  273. (if (= #pointer 1)
  274.     (
  275.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/PointerLores.lha" ))
  276.         (set #error (run #part))
  277.  
  278.         (if (NOT (= #error 0))
  279.             (message
  280.                 (if #germ ("Entpacken von 'PointerLores.lha' ist fehlgeschlagen!"))
  281.                 (if #engl ("Decompressing of 'PointerLores.lha' has failed!"))
  282.             )
  283.         )
  284.     )
  285. )
  286. (if (= #pointer 2)
  287.     (
  288.         (delete    (tackon @default-dest "Pointer_AD.pre")
  289.                     (tackon @default-dest "Pointer_DL.pre")
  290.                     (tackon @default-dest "Pointer_DT.pre")
  291.                     (tackon @default-dest "Pointer_LR.pre")
  292.                     (tackon @default-dest "Pointer_UD.pre")
  293.         )
  294.     )
  295. )
  296. (if (exists "archiv/key.lha" (noreq))
  297.     (
  298.         (set #part ("%s \"-qfaw=%s\" x \"%s\"" "lhex" @default-dest "archiv/key.lha" ))
  299.         (set #error (run #part))
  300.  
  301.         (if (NOT (= #error 0))
  302.             (message
  303.                 (if #germ ("Entpacken von 'key.lha' ist fehlgeschlagen!"))
  304.                 (if #engl ("Decompressing of 'key.lha' has failed!"))
  305.             )
  306.         )
  307.     )
  308. )
  309. ;--------------------------------------------------------------------------------------
  310. ;misc copy
  311. (complete 50)
  312.  
  313. (copyfiles
  314.     (if #germ (prompt "Kopiere nun die Dokumentation."))
  315.     (if #engl (prompt "Now copying the document."))
  316.     (help @copyfiles-help)
  317.     (source "")
  318.     (dest #path)
  319.     (files)
  320. ;    (infos)
  321. ;    (noposition)
  322.     (pattern "#?.guide")
  323. ;    (confirm)
  324. )
  325.  
  326. (copyfiles
  327.     (if #germ (prompt "Kopiere nun die Icons."))
  328.     (if #engl (prompt "Now copying the icons."))
  329.     (help @copyfiles-help)
  330.     (source "icons")
  331.     (dest root)
  332.     (all)
  333. )
  334.  
  335. ;--------------------------------------------------------------------------------------
  336. ;find out <part b>
  337.  
  338. (set #icon (tackon @default-dest "ScanTrax"))
  339.  
  340. (if (>= #scanner 1) ;disregard demo-module
  341.     (set #text
  342.         (askstring
  343.             (if #germ (prompt "Bitte geben Sie nun den SCSI-Treibernamen an."))
  344.             (if #engl (prompt "Please enter now the SCSI-Drivername."))
  345.             (help @askstring-help)
  346.             (default "scsi.device")
  347.         )
  348.     )
  349.     (set #text "scsi.device")
  350. )
  351. (tooltype
  352.     (dest #icon)
  353.     (settooltype "SCSI_DEVICE" #text)
  354. )
  355.  
  356. (if (>= #scanner 1) ;disregard demo-module
  357.     (set #text
  358.         (select
  359.             (askchoice
  360.                 (if #germ (prompt "Bitte wählen Sie die SCSI-ID ihres Scanners."))
  361.                 (if #engl (prompt "Please choose the SCSI-ID of your Scanner."))
  362.                 (help @askchoice-help)
  363.                 (if #germ (choices    "Finde ID automatisch" 0 1 2 3 4 5 6 ))
  364.                 (if #engl (choices    "Find ID automatic" 0 1 2 3 4 5 6 ))
  365.             )
  366.             "AUTO" "0" "1" "2" "3" "4" "5" "6"
  367.         )
  368.     )
  369.     (set #text "AUTO")
  370. )
  371. (tooltype
  372.     (dest #icon)
  373.     (settooltype "SCSI_UNIT" #text)
  374. )
  375.  
  376. ;two default settings
  377. (tooltype
  378.     (dest #icon)
  379.     (settooltype "(SCSI_LUN" "0)")
  380. )
  381. (tooltype
  382.     (dest #icon)
  383.     (settooltype "(SCSI_BOARD" "0)")
  384. )
  385.  
  386. (set #text
  387.     (select
  388.         (askchoice
  389.             (if #germ (prompt "Bitte wählen Sie nun die Größe des Arbeitspuffers.\n"))
  390.             (if #engl (prompt "Please choose now the workbuffer size.\n"))
  391.             (if #germ (help "Soll der Puffer noch größer werden, ändern Sie später die Programm-ToolTypes von Hand."))
  392.             (if #engl (help "To make a greater buffer, change the program-tooltypes later by hand."))
  393.             (choices    "1 MB" "2 MB" "3 MB")
  394.         )
  395.         "1048576" "2097152" "3145728")
  396. )
  397. (tooltype
  398.     (dest #icon)
  399.     (settooltype "BUFFER_SIZE" #text)
  400. )
  401.  
  402. (complete 75)
  403. (set #previewpath
  404.     (askdir
  405.         (if #germ (prompt "Wo sollen temporäre Vorschau-Dateien abgelegt werden?"))
  406.         (if #engl (prompt "Where should temporary preview-files be stored?"))
  407.         (if #germ (help "Vorschau-Dateien haben in der Regel eine Größe bis ca. 3 MegaByte."))
  408.         (if #engl (help "Preview-files normally have a size of approx. 3 MegaByte."))
  409.         (default "PROGDIR:")
  410.         (disk)
  411.     )
  412. )
  413. (set #temppath
  414.     (askdir
  415.         (if #germ (prompt "Wo sollen temporäre Bild-Dateien abgelegt werden?"))
  416.         (if #engl (prompt "Where should temporary picture-files be stored?"))
  417.         (if #germ (help "Bild-Dateien können in ihrer Größe mehre 10-MegaByte groß werden.\nDiese sollten daher auf Festplatte gespeichert werden."))
  418.         (if #engl (help "Picture-files can become several 10-MegaByte big at their size.\nTherefor these should be stored on Harddisk."))
  419.         (default "PROGDIR:")
  420.         (disk)
  421.     )
  422. )
  423.  
  424. (tooltype
  425.     (dest #icon)
  426.     (settooltype "CX_PRIORITY" "-20")
  427.     (settooltype "CX_POPKEY" "control s")
  428.     (settooltype "CX_POPUP" "YES")
  429.     (settooltype "CX_QUITKEY" "control q")
  430.     (settooltype "CX_QUICKSCANKEY" "F10")
  431.     (settooltype "SUFFIX_TARGA" ".tga")
  432.     (settooltype "SUFFIX_IFF_ILBM" ".ilbm")
  433.     (settooltype "SUFFIX_IFF_DEEP" ".deep")
  434.     (settooltype "SUFFIX_PNG" ".png")
  435.     (settooltype "SUFFIX_JPEG" ".jpg")
  436.     (settooltype "IMAGE_ICON_NAME" "Reference_Icon.info")
  437.     (settooltype "TEMPDIR_CONVERT" #temppath)
  438.     (settooltype "TEMPDIR_PREVIEW" #previewpath)
  439. )
  440.  
  441. ;--------------------------------------------------------------------------------------
  442. ;set some tooltypes according to userselection
  443.  
  444.  
  445. (if (= #scanner 0)
  446.     (
  447.         (tooltype
  448.             (dest #icon)
  449.             (settooltype "MODUL_NAME" "Demo")
  450.         )
  451.     )
  452. )
  453. (if (= #scanner 1)
  454.     (
  455.         (tooltype
  456.             (dest #icon)
  457.             (settooltype "MODUL_NAME" "ScanJet")
  458.         )
  459.     )
  460. )
  461. (if (= #scanner 2)
  462.     (
  463.         (tooltype
  464.             (dest #icon)
  465.             (settooltype "MODUL_NAME" "Epson")
  466.         )
  467.     )
  468. )
  469.  
  470. (if (= #support 0)
  471.     (
  472.         (tooltype
  473.             (dest #icon)
  474.             (settooltype "SUPPORT_NAME" "Support")
  475.         )
  476.     )
  477. )
  478. (if (= #support 1)
  479.     (
  480.         (tooltype
  481.             (dest #icon)
  482.             (settooltype "SUPPORT_NAME" "Support")
  483.         )
  484.     )
  485. )
  486. (if (= #support 2)
  487.     (
  488.         (tooltype
  489.             (dest #icon)
  490.             (settooltype "SUPPORT_NAME" "Support.elf")
  491.         )
  492.     )
  493. )
  494. (if (= #support 3)
  495.     (
  496.         (tooltype
  497.             (dest #icon)
  498.             (settooltype "SUPPORT_NAME" "Support.wos")
  499.         )
  500.     )
  501. )
  502.  
  503. (tooltype
  504.     (dest #icon)
  505.     (settooltype "(SCSI_EVEN" "0)")
  506.     (settooltype "(SCSI_SENSE" "0)")
  507.     (settooltype "(SCSI_LENGTH" "0)")
  508.     (settooltype "(FORCE_MODEL" "0)")
  509.     (settooltype "DONOTWAIT" "")
  510.     (setstack 6000)
  511. )
  512.  
  513. (user #expert)
  514.  
  515. (copylib
  516.     (prompt "Kopiere nun die Library \"gtlayout.library\".")
  517.     (help @copy-lib)
  518.     (source "libs/gtlayout.library")
  519.     (dest "LIBS:")
  520.     (confirm)
  521. )
  522.  
  523. (user #average)
  524.  
  525. (complete 100)
  526.